package com.news.cloud.web;

import com.news.cloud.exception.ServerTechnicalException;
import com.news.cloud.service.RssService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.text.ParseException;

/**
 * Created by hiephn on 2014/08/28.
 */
@Controller
@RequestMapping("/rss")
public class RssController implements ControllerConstant{

    @Autowired
    private RssService rssService;

    @RequestMapping(produces = MediaType.APPLICATION_JSON_VALUE)
    @ResponseBody
    public String get() throws ServerTechnicalException {
        rssService.update();
        return OK_STATUS;
    }
}
